import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },
    {
        path: '/about',
        name: 'about',
        component: function () {
            return import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
        }
    },
    {
        path: '/apiDocManage',
        name: 'ApiDocManage',
        component: function () {
            return import(/* webpackChunkName: "about" */ '../views/api-manage/ApiDocManage.vue')
        }
    },
    {
        path: '/apiParamFieldManage',
        name: 'ApiParamFieldManage',
        component: function () {
            return import('../views/api-manage/ApiParamFieldManage.vue')
        }
    },
    {
        path: '/allEnum',
        name: 'AllEnum',
        component: function () {
            return import('../views/system/AllEnum.vue')
        }
    },
    {
        path: '/businessManege',
        name: 'BusinessManege',
        component: function () {
            return import('../views/api-manage/BusinessManege.vue')
        }
    },
    {
        path: '/login',
        name: 'LoginPage',
        component: function () {
            return import('../views/LoginPage')
        }
    }
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
